package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the VEHICULO_HIST database table.
 * 
 */
@Entity
@Table(name="VEHICULO_HIST")
public class VehiculoHist implements Serializable {
	private static final long serialVersionUID = 1L;
	private VehiculoHistPK id;
	private String agntSync;
	private String codAccn;
	private String numMotor;
	private String numSerie;
	private Date tsInserc;
	private Date tsUltSync;
	private Partida partida;

    public VehiculoHist() {
    }


	@EmbeddedId
	public VehiculoHistPK getId() {
		return this.id;
	}

	public void setId(VehiculoHistPK id) {
		this.id = id;
	}
	

	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(name="COD_ACCN", length=1)
	public String getCodAccn() {
		return this.codAccn;
	}

	public void setCodAccn(String codAccn) {
		this.codAccn = codAccn;
	}


	@Column(name="NUM_MOTOR", length=30)
	public String getNumMotor() {
		return this.numMotor;
	}

	public void setNumMotor(String numMotor) {
		this.numMotor = numMotor;
	}


	@Column(name="NUM_SERIE", length=30)
	public String getNumSerie() {
		return this.numSerie;
	}

	public void setNumSerie(String numSerie) {
		this.numSerie = numSerie;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_INSERC")
	public Date getTsInserc() {
		return this.tsInserc;
	}

	public void setTsInserc(Date tsInserc) {
		this.tsInserc = tsInserc;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to Partida
    @ManyToOne
	@JoinColumn(name="REFNUM_PART", nullable=false, insertable=false, updatable=false)
	public Partida getPartida() {
		return this.partida;
	}

	public void setPartida(Partida partida) {
		this.partida = partida;
	}
	
}